<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改用户信息</title>
    <link rel="stylesheet" th:href="@{css/bootstrap.css}"/>
    <style>
        body {
            background-color: #f2f2f2;
            font-family: Arial, sans-serif;
        }

        .container {
            max-width: 400px;
            margin: 0 auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        h2 {
            text-align: center;
            color: #333;
            margin-bottom: 20px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        label {
            font-weight: bold;
            margin-bottom: 5px;
            color: #555;
        }

        input[type="text"] {
            width: 100%;
            padding: 10px;
            border-radius: 5px;
            border: 1px solid #ccc;
        }

        .btn {
            display: block;
            width: 100%;
            padding: 10px;
            background-color: #4CAF50;
            color: #fff;
            text-decoration: none;
            border-radius: 5px;
            transition: background-color 0.3s ease;
            cursor: pointer;
        }

        .btn:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
<div class="container">
    <h2>修改用户信息</h2>
    <form th:action="@{/edit}" method="post">
        <div class="form-group">
            <label for="current-name">当前昵称:</label>
            <input type="text" th:value="${editUser.name}" name="name" id="current-name" class="form-control" required>
        </div>
        <input type="hidden" name="id" th:value="${editUser.id}">
        <div class="form-group">
            <label for="phone">联系方式:</label>
            <input type="text" th:value="${editUser.phone}" name="phone" id="phone" class="form-control" required>
        </div>
        <div class="form-group">
            <label for="role">用户身份:</label>
            <input type="text" th:value="${editUser.role}" placeholder="user 或  admin" name="role" id="role" class="form-control" required>
        </div>

        <div class="form-group">
            <input type="submit" value="确认修改" class="btn btn-primary">
        </div>
    </form>
</div>
</body>
</html>
